Skip to content

typing: Accept tuple of exceptions in assertRaises#577

Merged
jelmer merged 3 commits intotesting-cabal:masterfrom
stephenfin:typing
Mar 5, 2026
Merged

typing: Accept tuple of exceptions in assertRaises#577
jelmer merged 3 commits intotesting-cabal:masterfrom
stephenfin:typing

Conversation

@stephenfin
Copy link
Contributor

Per $subject. We also ensure we return Self from __enter__.

This accepts a tuple of exception types also, as the `isinstance` check
in `_AssertRaisesContext.__exit__` reveals.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Stephen Finucane <stephen@that.guru>
Provider overloads so we know we can distinguish between use as
context manager vs the historical function call pattern.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@jelmer jelmer merged commit 8bd225c into testing-cabal:master Mar 5, 2026
9 checks passed
@stephenfin stephenfin deleted the typing branch March 5, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants